﻿#region Copyright RenGuiYou. All rights reserved.
//=====================================================
// PandoraFrameWork
// Author:      RenGuiyou
// Feedback: 	mailto:750539605@qq.com
//=====================================================
#endregion
using UnityEditor;
using UnityEngine;

namespace PandoraEditor.Window
{
    public class ProjectBuildCategory : ConfigCategory
    {
        public override void OnInit()
        {
            name = "项目构建";
        }

        public override void OnDrawAction()
        {
            var setting = BuildSetting.ProjectBuildSetting;
            EditorGUILayout.Space();
            EditorGUILayout.LabelField("工程配置", EditorStyles.boldLabel);
            GUILayout.BeginVertical("box");
            {
                setting.company_name = EditorGUILayout.TextField("Company Name", setting.company_name);
                setting.product_name = EditorGUILayout.TextField("Product Name", setting.product_name);
                setting.bundle_identifier = EditorGUILayout.TextField("Bundle Identifier", setting.bundle_identifier);
                setting.version = EditorGUILayout.TextField("Version", setting.version);
                setting.symbols = EditorGUILayout.TextField("Symbols", setting.symbols);
                setting.is_develop = EditorGUILayout.Toggle("Develop", setting.is_develop);
                setting.is_console = EditorGUILayout.Toggle("Console", setting.is_console);
            }
            GUILayout.EndVertical();
            EditorGUILayout.Space();
            EditorGUILayout.LabelField("属性配置", EditorStyles.boldLabel);
            GUILayout.BeginVertical("box");
            {
                setting.is_portrait = EditorGUILayout.Toggle("Portrait", setting.is_portrait);
                setting.is_portrait_upside_down = EditorGUILayout.Toggle("Portrait Upside Down", setting.is_portrait_upside_down);
                setting.is_landscape_right = EditorGUILayout.Toggle("Landscape Right", setting.is_landscape_right);
                setting.is_landscape_left = EditorGUILayout.Toggle("Landscape Left", setting.is_landscape_left);
            }
            GUILayout.EndVertical();
            EditorGUILayout.Space();
            EditorGUILayout.LabelField("Android Key", EditorStyles.boldLabel);
            GUILayout.BeginVertical("box");
            {
                setting.android_key_store_name = EditorGUILayout.TextField("key Store Path", setting.android_key_store_name);
                setting.android_key_store_pass = EditorGUILayout.TextField("key Store Password", setting.android_key_store_pass);
                setting.android_key_alias_name = EditorGUILayout.TextField("key Alias Name", setting.android_key_alias_name);
                setting.android_key_alias_pass = EditorGUILayout.TextField("key Alias Password", setting.android_key_alias_pass);
            }
            GUILayout.EndVertical();
        }
    }
}